Skip to content

Fix/#652 erase constructors #675

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 10 commits into from
Jun 22, 2015

Conversation

odersky
Copy link
Contributor

@odersky odersky commented Jun 19, 2015

Several problems detected and fixed when trying to compile constructors.scala. These are all pretty fundamental, and therefore a version of the PR should be merged before we try to continue with the bootstrap. Review by @DarkDimius.

odersky added 3 commits June 19, 2015 23:08
Thsi was not true for erased typechecking.
This was one source of the "reference to this before super" errors.
Map references to outer accessors in secondary constructors to outer parameters. This
was the second source of "reference to this before super call" errors.
@odersky
Copy link
Contributor Author

odersky commented Jun 19, 2015

Fixes #652

odersky added 2 commits June 20, 2015 00:43
Proxy references in constructors can't be left as fields because
they can happen before the supercall.
Previously this was only done in secondary constructors; need
to do it in primary constructor as well to avoid "reference to
this before super" problems.
@odersky
Copy link
Contributor Author

odersky commented Jun 19, 2015

Now fixes also #644

odersky added 5 commits June 20, 2015 00:56
Only outer references that point to the same class as the outer parameter should be
mapped. Other outer references should be left alone. Such references can appear
after the initial supercall of a constructor.
Difference was in generated number for anonymous classes only.
We seem to have an instability where the testing framework influences what numbers
anonymous classes are given. We have to deal with this, but not now. For the moment
I am masking numbers from the test output.
Ws disabled by accident.
odersky added a commit that referenced this pull request Jun 22, 2015
@odersky odersky merged commit 7c88469 into scala:master Jun 22, 2015
@odersky
Copy link
Contributor Author

odersky commented Jun 22, 2015

Hmm, how do I get the original PR back?

@odersky
Copy link
Contributor Author

odersky commented Jun 22, 2015

I'll do a second branch.

@DarkDimius
Copy link
Contributor

Otherwise LGTM. No need to revert.

@allanrenucci allanrenucci deleted the fix/#652-erase-constructors branch December 14, 2017 19:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants